package ${entity.packageName}.logic.gview.arrange;


import com.gonsin.gview.annotations.GView;
import com.gonsin.gview.annotations.actions.GAction;
import com.gonsin.gview.annotations.actions.GSession;
import com.gonsin.gview.annotations.board.GBoard;
import com.gonsin.gview.annotations.board.GButton;
import com.gonsin.gview.annotations.board.form.*;
import com.gonsin.gview.annotations.data.GData;
import com.gonsin.gview.annotations.data.GDataChanged;
import com.gonsin.gview.annotations.data.GListData;
import com.gonsin.gview.annotations.data.GTreeData;
import com.gonsin.gview.annotations.enums.ButtonAction;
import com.gonsin.venus.base.logic.session.SessionKeys;
import ${entity.packageName}.bean.${entity.entityName}Bean;
import ${entity.packageName}.interfaces.I${entity.entityName}Service;
import ${entity.packageName}.po.${entity.entityName}Po;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

<#include "/gview/gview"/>
@Component
public class Add${entity.entityName}View {

    @Autowired private I${entity.entityName}Service ${entity.entityNameFirstLower}Service;

    @GAction("add${entity.entityName}")
    @GDataChanged("search${entity.entityName}")
    public void add${entity.entityName}(@GSession(SessionKeys.EDIFICE_KEY) String edificeKey, ${entity.entityName}Po bean){
        ${entity.entityNameFirstLower}Service.add${entity.entityName}(edificeKey, bean);
    }

}
